<div class="dcat-box">
    <div class="d-block pb-0">
        @include('admin::grid.table-toolbar')
    </div>
    {!! $grid->renderFilter() !!}
    {!! $grid->renderHeader() !!}
    <div class="{!! $grid->formatTableParentClass() !!}" style="background: #f0f2f5">
        <div class="row" style="margin:5px">
            @foreach($grid->rows() as $row)
                <div class="col-md-3" style="display: inline-block; padding: 0 5px">
                    <div class="card Dcat_Admin_Widgets_Card" style="min-height: 93%; margin: 10px 0 25px 0;">
                        <div class="card-header ">
                            <span class="card-box-title">等级名称: {{ $row->name }}</span>
                            <div class="box-tools pull-right">
                                {!! $row->column('__actions__') !!}
                            </div>
                        </div>
                        <div class="card-body" style="">
                            @if($row->id==1)
                                <p>一、15天内平台单品成功分享裂变 <span class="label bg-info">{{$row->rules[0]}}</span> 次</p>
                                <p>二、15天内创业币积分达到 <span class="label bg-info">{{$row->rules[1]}}</span> 积分</p>
                                <p>三、15天内爱心值积分达到 <span class="label bg-info">{{$row->rules[2]}}</span> 积分</p>
                                <p>分取销售产品销售额百分比 <span class="label bg-info">{{$row->rates}}%</span></p>
                            @else
                                <p>一、裂变 <span class="label bg-info">{{$row->rules[0]}}</span> 次</p>
                                <p>二、创业币积分累计数量达到 <span class="label bg-info">{{$row->rules[1]}}</span> 积分</p>
                                <p>三、爱心值积分累计数量达到 <span class="label bg-info">{{$row->rules[2]}}</span> 积分</p>
                                <p>分取销售产品销售额百分比 :</p>
                                @foreach($row->rates as $k=>$rate)
                                    <div style="display: inline-block;margin: 1px 2px">
                                        {{ $k > 0? $rate['name'].":" : '当前分成:' }}
                                        <span class="label bg-info">{{$rate['rate']}}%</span>
                                    </div>
                                @endforeach
                            @endif
                        </div>
                    </div>
                </div>
            @endforeach
        </div>
    </div>

    {!! $grid->renderFooter() !!}

    {!! $grid->renderPagination() !!}

</div>

